1. Field of the Invention
The present invention relates to a method of data scaling, and more particularly to a method of scaling up or down of different types of data such as graphics, image, video or audio data, and for application of polygon curve fitting in many areas such as object moving tracking analysis, data analysis, a finder for objects of 2D shape or 3D surface in graphic areas.
2. Description of Related Art
Scaling is useful for operations in graphics, image, video or audio application for expanding or shrinking sample resolution and for zooming. Especially in digital display devices with fixed resolution, different kinds of source image formats must be scaled to fit the required resolution of the digital display.
For example, a display panel may have a resolution of 1024×768 pixels in XGA mode, but the source image may be provided from computer, video decoder, or others that may have input resolution different from the display panel depending on the input modes. The input source in VGA mode (640×480 pixels) with resolution less that that of display mode XGA needs to be scaled up when displayed on the XGA panel. On the other hand, an input source in SXGA mode (1280×1024 pixels) with resolution greater than that of display mode XGA needs to be scaled down when displayed on the XGA panel. Image resizing is very important for digital display devices such as LCD. Various well-known conventional methods, such as Bilinear, Cubic, B-Spline, Bésier have been proposed in order to achieve a good filtering effect for scaling uses.
The Bilinear method is the most commonly used method using interpolation. Its advantages are its simplicity, speed, and cost since only two reference points are taken. As a result, the cost of the implementation of the Bilinear method is low because computation and storage requirements are less compared with other high-order interpolation methods. However, the output of the Bilinear method is blurry due to lack of sharpness from the interpolation results and is, therefore. not suitable for use in text image. The sharpness of the picture quality depends on the curve after fitting the interpolation points. The Bilinear method takes the weighting average as the interpolation result. When considering two neighboring pixels A, B, if the interpolation point C is located between A and B with distance D (D≦1) from A, then the interpolation result, according to the Bilinear method, isC=A(1−D)+B D  Eq. 1In this manner, even though the interpolation form is simple, the quality is poor.
Cubic or B-Spline methods are the more preferred methods used in high quality scaling system with almost perfect scaling quality, but the cost is very high for computation and storage. Cubic methods usually require 4 points f(−1), f(0), f(1), and f(2) as reference. The Cubic Curve using the Hermite Method has one start point P1, one end point P2, one start point tangent-vector R1, and one end point tangent-vector R2 by the formula
                              f          ⁡                      (            x            )                          =                ⁢                                            (                                                2                  ⁢                                      x                    3                                                  -                                  3                  ⁢                                      x                    2                                                  +                1                            )                        ⁢                          P              1                                +                                    (                                                                    -                    2                                    ⁢                                      x                    3                                                  +                                  3                  ⁢                                      x                    2                                                              )                        ⁢                          P              2                                +                                    (                                                x                  3                                -                                  2                  ⁢                                      x                    2                                                  +                x                            )                        ⁢                          R              1                                +                                    (                                                x                  3                                -                                  x                  2                                            )                        ⁢                          R              2                                                                  ⁢                  Eq          ⁢          .2                                        =                ⁢                                            (                                                2                  ⁢                                      P                    1                                                  -                                  2                  ⁢                                      P                    2                                                  +                                  R                  1                                +                                  R                  2                                            )                        ⁢                          x              3                                +                                    (                                                                    -                    3                                    ⁢                                      P                    1                                                  +                                  3                  ⁢                                      P                    2                                                  -                                  2                  ⁢                                      R                    1                                                  -                                  R                  2                                            )                        ⁢                          x              2                                +                                    R              1                        ⁢            x                    +                      P            1                                                      ⁢                  Eq          ⁢          .3                                    whereP1=f(0),P2=f(1)R1=G1(P2−P0)/2=G1[f(1)−f(−1)]/2=tangent-vector at P1R2=G2(P3−P1)/2=G2[f(2)−f(0)]/2=tangent-vector at P2G1, G2 are gain factors, wherein gain factor is proportional to the sharpness of the scaling result.        
En the foregoing conventional methods, Bilinear method can be easily implemented. However, the interpolation result depends on quantities of only two points. When the change of quantity at certain ranging has a large variation, the image after scaling would lose fidelity. For the Cubic or B-Spline methods, more information is included, but its implementation would be more complex, the cost is high and the computation is more tedious. So, the foregoing conventional methods still have their disadvantages.